-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Add cell to CellCache #1060
base: master
Are you sure you want to change the base?
Conversation
Can you ELI5 why the celltype should be in the CellCache (and why it should be a union)? Having a union might be an issue for the GPU stuff. We are currently working towards making CellCache type stable for the GPU (xref #1049 (comment)). |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1060 +/- ##
==========================================
- Coverage 93.65% 93.62% -0.03%
==========================================
Files 39 39
Lines 6003 6023 +20
==========================================
+ Hits 5622 5639 +17
- Misses 381 384 +3 ☔ View full report in Codecov by Sentry. |
Needed to support reinit! for vector interpolations using the CellIterator. Union: the grid has a Union, the cellCache not, but the constructor should be type unstable. Iteration is not. |
Thanks!
|
The actual cell is required to determine the global direction of faces or edges based on its node ids during reinit of FEValues with non-identity mappings. |
Couldn't the cell be looked up in |
Yes, would be possible. But that felt like a split design, to partly reinit the cell cache, and then do more lookup based on the grid in the cache during reinit of the fe values. And also not sure if there are performance pitfalls regarding type stability here, especially for GPU if a Union isn't allowed during |
We should not consider type params as part of the API so this is not breaking. |
Just to ensure that this can be done in a non-breaking way after #798 is merged.
Did not see any performance degradation on the porous media example where the cell type is
Union{Quadrilateral, Triangle}
, so the approach in this PR does look ok AFAIU.No need to merge now - just wanted to prevent any issues after 1.0 release..